<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.lmpop.trade.ti_goods.Ti_goodsInfo" %>

<%
 
 	request.setCharacterEncoding("utf-8");

  String cat_id="",brand_id="",info="",cust_id="",type="";
	
	if(session.getAttribute("session_cust_id")!=null){
	     cust_id  =session.getAttribute("session_cust_id").toString();
	}

	if(request.getParameter("cat_id") != null) {
		 cat_id = request.getParameter("cat_id").trim();
	}
  
  if(request.getParameter("brand_id") != null) {
		 brand_id = request.getParameter("brand_id").trim();
	}
  
  if(request.getParameter("info") != null) {
		 info = request.getParameter("info").trim();
	   info = java.net.URLDecoder.decode(info,"UTF-8");	
	 }

  
  if(request.getParameter("type") != null) {
		 type = request.getParameter("type").trim();
	}
   
   
   Ti_goodsInfo  ti_goodsInfo =  new Ti_goodsInfo();
   
   List glist = ti_goodsInfo.getListForTable(cat_id,cust_id,info,brand_id);	
   
   //out.print("--------==="+glist); 
   
   %>     
<html>

    <head>
        <meta http-equiv="x-ua-compatible" content="ie=7" />
        <title>more college</title>
        <script type="text/javascript" src="/js/commen.js"></script>
        <link href="/program/admin/index/css/style.css" rel="stylesheet" type="text/css">
        <script src="js_link.js" type="text/javascript"></script>
    </head>

    <body>
    
			<div style="width:600px;">
		   <table width="100%" cellpadding="1" cellspacing="1" class="listtab" border="0">
				<tr>
					<th width="5%" align="center"><input type="checkbox" name="checkall" id="checkall" onclick="selectAll()"></th>
					<th>货号</th>
			  	<th>商品名</th>
					<th>销售价</th>
					<th>当前库存</th>
				</tr>
				<% 
		     int listsize=0;
		     if(glist!=null && glist.size()>0){
		        listsize =  glist.size();     
		        for(int i = 0;i < listsize;i++){ 
		        Hashtable gMap =(Hashtable)glist.get(i);
		        String goods_no="",goods_id ="",goods_name="",sale_price="",stock_num="";
		        if (gMap.get("goods_no") != null){
							goods_no = gMap.get("goods_no").toString();
						}
						if (gMap.get("goods_id") != null){
							goods_id = gMap.get("goods_id").toString();
						}
						if (gMap.get("sale_price") != null){
							sale_price = gMap.get("sale_price").toString();
						}
						if (gMap.get("stock_num") != null){
							stock_num = gMap.get("stock_num").toString();
						}
						if (gMap.get("goods_name") != null){
							goods_name = gMap.get("goods_name").toString();
						  if(goods_name.length()>35){
		             goods_name = goods_name.substring(0,35);				  
						  }
						}  
		   	%>		
				<tr>
					<td width="5%" align="center">
						<input type="checkbox" name="checkone<%=i%>" id="checkone<%=i%>" value="<%=goods_id%>" />
						<input type="hidden" name="chechGoodsName" id="chechGoodsName<%=i%>" value="<%=goods_name%>" />
					</td>
					<td><%=goods_no%></td>
			  	<td><%=goods_name%></td>
			  	<td><%=sale_price%></td>
			  	<td><%=stock_num%></td>
				</tr>
				<%
		   			}	  
			  	}
			  %>  
			</table> 
			</div>
			<br/>
			
			
			<div style="text-align:center;">
			<input type="button" class="buttoncss" value="确定" onclick="linkGoodsOpr();">
      <input type="hidden" name="listsize" id="listsize" value="<%=listsize%>">
      </div> 
    </body>
	   <input type="hidden" name="type" id="type" value="<%=type%>">
</html>
